package cn.szabadsag.pet.domain;

import cn.szabadsag.base.domain.BaseDomain;
import cn.szabadsag.org.domain.Shop;
import cn.szabadsag.user.domain.User;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class Pet extends BaseDomain {

    private String name;
    private String resources;
    private BigDecimal saleprice;

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date offsaletime;

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date onsaletime;

    //  0:表示    2：表示已出售
    private Integer state = 0;
    private BigDecimal costprice;
    private Date createtime = new Date();
    private Long type_id = 1L;
    private PetType type;
    private Long shop_id;
    private Shop shop;
    private Long user_id;
    private User user;
    private Long adopt_id;

    private PetDetail detail = new PetDetail();

}
